<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript">
	$(document).ready(function() {
		$.formValidator.initConfig({
			formid: "myform",
			autotip: true,
			onerror: function(msg, obj) {
				window.top.art.dialog({
					content: msg,
					lock: true,
					width: '200',
					height: '50'
				})
			}
		});
		$("#name").formValidator({
			onshow: "<?php echo L('input').L('contest_process_name')?>",
			onfocus: "<?php echo L('input').L('contest_process_name')?>"
		}).inputValidator({
			min: 1,
			onerror: "<?php echo L('input').L('contest_process_name')?>"
		});

		$("#sort").formValidator({
			onshow: "<?php echo L('input').L('contest_process_sort')?>",
			onfocus: "<?php echo L('input').L('contest_process_sort')?>"
		}).inputValidator({
			type:"number",
			min: 0,
			onerror: "<?php echo L('input').L('contest_process_sort')?>"
		});






	});
</script>
<div class="pad-10">

	<form name="myform" action="?m=contest&c=process&a=edit" method="post"
		  id="myform" enctype="multipart/form-data">
		<input type="hidden" name="data[contest_id]" value="<?=$data['contest_id']?>">
		<input type="hidden" name="id" value="<?=$id?>">

		<div class="content pad-10" id="show_div_1" style="height: auto">
			<fieldset>
				<legend><?php echo L('contest_process_info')?></legend>
				<table width="100%" class="table_form">


					<tr>
						<td width="120"><?php echo L('contest_process_name')?>：</td>
						<td><input type="text" name="data[name]" id="name"
								   class="input-text"   value="<?= isset($data['name'])?$data['name']:""?>"  /></td>
					</tr>



					<tr>
						<td width="120"><?php echo L('contest_process_time')?>：</td>

						<td>
							<?php echo form::date('data[begin_time]', isset($data['begin_time'])?$data['begin_time']:date('Y-m-d'), 0, 0, 'true', 1)?>
							-
							<?php echo form::date('data[end_time]', isset($data['begin_time'])?$data['end_time']:date('Y-m-d'), 0, 0, 'true', 1)?></td>
					</tr>

					<tr>
						<td width="120"><?php echo L('contest_process_sort')?>：</td>
						<td><input type="text" name="data[sort]" id="sort"
								   class="input-text" value="<?php echo isset($data['sort'])? $data['sort']:0;?>" /></td>
					</tr>


					<tr>
						<td width="120"><?php echo L('contest_process_logo')?>：</td>

						<td><?php echo form::images('data[logo]', 'logo',isset($data['logo'])?$data['logo']:"", 'contest', '', 40)?></td>
					</tr>

					<tr>
						<td width="120"><?php echo L('contest_process_description')?>：</td>
						<td><textarea rows="10" cols="80" name="data[description]"
									  id="description"><?php if(isset($data['description']) ) { echo $data['description'];}?></textarea>
						</td>
					</tr>


				</table>
			</fieldset>


		</div>
		<div class="bk15"></div>
		<input type="submit" class="dialog" id="dosubmit" name="dosubmit"
			   value="<?php echo L('submit')?>" />

	</form>

</div>
</body>
</html>